/* Light Sea UI — Zadania Maturalne (fully responsive, polished UI) */

:root{
  --page-bg: #bfe9e6;

  --ink: #071a2b;
  --ink-2: rgba(7,26,43,.72);
  --muted: rgba(7,26,43,.55);

  --white: #ffffff;
  --card: rgba(255,255,255,.92);

  --line: rgba(7,26,43,.10);
  --shadow: 0 18px 45px rgba(7,26,43,.12);
  --shadow-soft: 0 10px 24px rgba(7,26,43,.10);

  --accent: #0ea5a3;
  --accent-2: #0b7285;

  --r-xl: 28px;
  --r-lg: 22px;
  --r-pill: 999px;

  --glass-bg: rgba(255,255,255,.40);
  --glass-shadow: 0 14px 30px rgba(7,26,43,.12);

  --done: #16a34a;
  --todo: #dc2626;
}

*{ box-sizing:border-box }
html,body{ height:100% }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--ink);
  background-color: var(--page-bg);

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='900' viewBox='0 0 900 900'%3E%3Crect width='900' height='900' fill='none'/%3E%3Cg font-family='system-ui, -apple-system, Segoe UI, Roboto, Arial' font-weight='800'%3E%3Cg fill='%23074a78' fill-opacity='0.11'%3E%3Ctext x='68' y='96' font-size='52' transform='rotate(-10 68 96)'%3E%E2%88%AB%3C/text%3E%3Ctext x='236' y='104' font-size='44' transform='rotate(8 236 104)'%3E%CF%80%3C/text%3E%3Ctext x='402' y='92' font-size='50' transform='rotate(-6 402 92)'%3E%E2%88%9A%3C/text%3E%3Ctext x='572' y='110' font-size='48' transform='rotate(12 572 110)'%3E%E2%88%91%3C/text%3E%3Ctext x='736' y='94' font-size='50' transform='rotate(-12 736 94)'%3E%E2%88%9E%3C/text%3E%3Ctext x='92' y='254' font-size='44' transform='rotate(10 92 254)'%3E%CE%94%3C/text%3E%3Ctext x='250' y='270' font-size='40' transform='rotate(-8 250 270)'%3E%E2%88%82%3C/text%3E%3Ctext x='424' y='262' font-size='46' transform='rotate(14 424 262)'%3E%E2%89%88%3C/text%3E%3Ctext x='590' y='270' font-size='44' transform='rotate(-10 590 270)'%3E%CE%BB%3C/text%3E%3Ctext x='754' y='254' font-size='42' transform='rotate(8 754 254)'%3E%CF%86%3C/text%3E%3Ctext x='80' y='430' font-size='44' transform='rotate(-12 80 430)'%3E%CE%B1%3C/text%3E%3Ctext x='248' y='446' font-size='44' transform='rotate(10 248 446)'%3E%CE%B2%3C/text%3E%3Ctext x='414' y='434' font-size='44' transform='rotate(-8 414 434)'%3E%CE%B3%3C/text%3E%3Ctext x='586' y='452' font-size='46' transform='rotate(12 586 452)'%3E%CF%89%3C/text%3E%3Ctext x='744' y='438' font-size='44' transform='rotate(-10 744 438)'%3E%CE%BC%3C/text%3E%3Ctext x='70' y='612' font-size='44' transform='rotate(10 70 612)'%3E%E2%89%A0%3C/text%3E%3Ctext x='236' y='620' font-size='42' transform='rotate(-8 236 620)'%3E%2B%3C/text%3E%3Ctext x='406' y='610' font-size='42' transform='rotate(10 406 610)'%3E%E2%88%92%3C/text%3E%3Ctext x='572' y='622' font-size='42' transform='rotate(-10 572 622)'%3E%C3%97%3C/text%3E%3Ctext x='738' y='612' font-size='42' transform='rotate(12 738 612)'%3E%C3%B7%3C/text%3E%3Ctext x='84' y='784' font-size='42' transform='rotate(-10 84 784)'%3E%3D%3C/text%3E%3Ctext x='222' y='788' font-size='30' transform='rotate(8 222 788)'%3Esin%3C/text%3E%3Ctext x='402' y='792' font-size='30' transform='rotate(-8 402 792)'%3Ecos%3C/text%3E%3Ctext x='586' y='790' font-size='30' transform='rotate(10 586 790)'%3Etg%3C/text%3E%3Ctext x='760' y='782' font-size='52' transform='rotate(-12 760 782)'%3E%E2%88%AB%3C/text%3E%3C/g%3E%3Cg fill='%230369a1' fill-opacity='0.09'%3E%3Ctext x='148' y='170' font-size='34' transform='rotate(12 148 170)'%3E%2B%3C/text%3E%3Ctext x='330' y='176' font-size='34' transform='rotate(-10 330 176)'%3E%E2%88%92%3C/text%3E%3Ctext x='508' y='168' font-size='34' transform='rotate(10 508 168)'%3E%C3%97%3C/text%3E%3Ctext x='676' y='176' font-size='34' transform='rotate(-12 676 176)'%3E%C3%B7%3C/text%3E%3Ctext x='156' y='352' font-size='34' transform='rotate(-10 156 352)'%3E%3D%3C/text%3E%3Ctext x='326' y='348' font-size='30' transform='rotate(10 326 348)'%3Esin%3C/text%3E%3Ctext x='510' y='356' font-size='30' transform='rotate(-8 510 356)'%3Ecos%3C/text%3E%3Ctext x='676' y='352' font-size='30' transform='rotate(10 676 352)'%3Etg%3C/text%3E%3Ctext x='154' y='526' font-size='44' transform='rotate(10 154 526)'%3E%CF%80%3C/text%3E%3Ctext x='326' y='528' font-size='46' transform='rotate(-12 326 528)'%3E%E2%88%9A%3C/text%3E%3Ctext x='502' y='530' font-size='46' transform='rotate(12 502 530)'%3E%E2%88%91%3C/text%3E%3Ctext x='676' y='522' font-size='46' transform='rotate(-10 676 522)'%3E%E2%88%9E%3C/text%3E%3Ctext x='156' y='700' font-size='40' transform='rotate(10 156 700)'%3E%CE%94%3C/text%3E%3Ctext x='334' y='704' font-size='38' transform='rotate(-10 334 704)'%3E%E2%88%82%3C/text%3E%3Ctext x='502' y='706' font-size='40' transform='rotate(12 502 706)'%3E%CE%BB%3C/text%3E%3Ctext x='676' y='700' font-size='38' transform='rotate(-12 676 700)'%3E%CF%86%3C/text%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 900px 900px;
}

@media (max-width: 768px){
  body{ background-size: 1040px 1040px; }
}

a{ color: inherit; text-decoration:none }
a:hover{ text-decoration:none }

.container{
  width:min(100% - 32px, 1120px);
  margin:0 auto;
}

@media (max-width: 768px){
  .container{
    width:min(100% - 16px, 100%);
  }
}

.app{ position: relative; z-index: 1; }

/* Topbar */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(1.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  border-bottom: 1px solid rgba(255,255,255,.65);
  box-shadow: var(--glass-shadow);
}
.topbar .container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 12px 0;
}
@media (max-width: 640px){
  .topbar .container{
    flex-direction: column;
    align-items: stretch;
  }
}

.brand__link{
  display:flex;
  align-items:center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: .2px;
}
.brand__dot{
  width: 12px;
  height: 12px;
  border-radius: var(--r-pill);
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(14,165,163,.16);
}

.topnav{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
}
@media (max-width: 640px){
  .topnav{
    width: 100%;
    justify-content: stretch;
  }
  .topnav a{
    flex: 1 1 0;
  }
}
.topnav a{
  padding: 10px 12px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255,255,255,.65);
  background: rgba(255,255,255,.32);
  color: var(--ink);
  transition: transform .14s ease, background .14s ease, border-color .14s ease;
  text-align:center;
}
.topnav a:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.55);
  border-color: rgba(255,255,255,.85);
}

/* Cards */
.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  padding: 18px;
  margin: 16px 0;
}
@media (max-width: 640px){
  .card{
    padding: 14px;
    border-radius: 22px;
  }
}
.card--glass{
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.70);
}

/* Typography */
h1{
  margin: 0 0 8px 0;
  font-size: clamp(26px, 3.4vw, 46px);
  line-height: 1.05;
  letter-spacing: .2px;
}
p{ margin: 10px 0; color: var(--ink-2) }
.muted{ color: var(--muted) }
code{
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(7,26,43,.10);
  padding: 3px 8px;
  border-radius: 12px;
}

/* Breadcrumbs */
.breadcrumbs{
  display:flex;
  gap: 8px;
  align-items:center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.breadcrumbs a{
  color: var(--ink-2);
  border-bottom: 1px dashed rgba(7,26,43,.22);
}
.breadcrumbs a:hover{
  color: var(--ink);
  border-bottom-color: rgba(7,26,43,.35);
}

/* Dashboard */
.heroGrid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.heroCard{
  border-radius: var(--r-xl);
  padding: 18px;
  border: 1px solid rgba(255,255,255,.75);
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  box-shadow: var(--shadow-soft);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.heroCard:hover{
  transform: translateY(-2px);
  box-shadow: 0 20px 55px rgba(7,26,43,.14);
  border-color: rgba(14,165,163,.40);
}
.heroCard__row{
  display:flex;
  justify-content:space-between;
  gap: 12px;
  align-items:flex-start;
}
.heroCard__title{ margin:0; font-size: 18px; font-weight: 900; color: var(--ink) }
.heroCard__desc{ margin: 8px 0 0 0; color: var(--ink-2); line-height: 1.45 }
.heroCard__pill{
  display:inline-flex;
  padding: 8px 12px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(14,165,163,.25);
  background: rgba(255,255,255,.70);
  color: var(--accent-2);
  font-weight: 800;
  font-size: 13px;
}
.heroCard__icon{
  width: 44px;
  height: 44px;
  border-radius: var(--r-lg);
  background: rgba(14,165,163,.12);
  border: 1px solid rgba(14,165,163,.18);
  display:grid;
  place-items:center;
  flex: 0 0 auto;
}
.heroCard__icon svg{ width: 22px; height: 22px; color: var(--accent-2) }

/* Sections */
.sectionGrid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
@media (max-width: 560px){
  .sectionGrid{
    grid-template-columns: 1fr;
  }
}

.sectionTile{
  border-radius: var(--r-xl);
  border: 1px solid rgba(7,26,43,.10);
  background: rgba(255,255,255,.70);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: var(--shadow-soft);
  padding: 14px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap: 14px;
  min-height: 190px;
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}
.sectionTile:hover{
  transform: translateY(-2px);
  border-color: rgba(14,165,163,.35);
  background: rgba(255,255,255,.84);
}
.sectionTile__kicker{
  margin:0 0 6px 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing:.2px;
}
.sectionTile__title{
  margin:0;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.2;
  font-size: clamp(18px, 2vw, 22px);
  word-break: break-word;
}

/* Tile actions */
.tileActions{
  margin-top: 0;
  display:grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items:center;
}
.tileActions .btn{
  min-height: 42px;
}
@media (max-width: 720px){
  .tileActions{
    grid-template-columns: 1fr;
  }
  .tileActions .btn{
    width: 100%;
    justify-content:center;
  }
}

/* Progress in tiles */
.sectionTile .progressPill{
  width: 100%;
  padding: 8px 10px;
  gap: 10px;
  box-shadow: none;
  background: rgba(255,255,255,.55);
}
.sectionTile .progressPill__label{
  font-size: 12px;
  letter-spacing:.2px;
}
.sectionTile .progressPill__value{
  font-size: 12px;
}
.sectionTile .progressPill__bar{
  flex: 1 1 auto;
  min-width: 70px;
  width: auto;
  height: 8px;
  background: rgba(7,26,43,.07);
}
.sectionTile .progressPill__bar > span{
  background: rgba(14,165,163,.65);
}

/* List */
.list{
  display:flex;
  flex-direction:column;
  gap: 10px;
  margin-top: 10px;
}
.list__item{
  border-radius: var(--r-xl);
  border: 1px solid rgba(7,26,43,.10);
  background: rgba(255,255,255,.70);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: var(--shadow-soft);
  padding: 14px 16px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}
.list__item:hover{
  transform: translateY(-2px);
  border-color: rgba(14,165,163,.35);
  background: rgba(255,255,255,.84);
}
.list__title{
  font-weight: 950;
  color: var(--ink);
}
.list__meta{
  color: var(--muted);
  font-weight: 700;
}
@media (max-width: 640px){
  .list__item{
    flex-direction: column;
    align-items: stretch;
  }
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 12px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(14,165,163,.35);
  background: rgba(255,255,255,.82);
  color: var(--accent-2);
  font-weight: 900;
  transition: background .14s ease, transform .14s ease, color .14s ease;
  text-align:center;
}
.btn:hover{
  transform: translateY(-1px);
  background: rgba(14,165,163,.16);
  color: var(--ink);
}
.btn--ghost{
  border-color: rgba(7,26,43,.12);
  color: var(--ink);
  background: rgba(255,255,255,.60);
}
.btn--ghost:hover{ background: rgba(255,255,255,.88) }
.btn--sm{
  padding: 8px 10px;
  font-size: 13px;
}
.btn--disabled{
  opacity:.55;
  pointer-events:none;
}

/* Progress */
.progressRow{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  margin-top: 10px;
  align-items:center;
}
.progressPill{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(7,26,43,.10);
  box-shadow: var(--shadow-soft);
  max-width: 100%;
}
.progressPill__label{
  font-weight: 900;
  color: var(--ink);
  font-size: 13px;
  white-space:nowrap;
}
.progressPill__value{
  font-weight: 950;
  color: var(--accent-2);
  font-size: 13px;
  white-space:nowrap;
}
.progressPill__bar{
  width: 140px;
  max-width: 30vw;
  min-width: 60px;
  height: 10px;
  border-radius: var(--r-pill);
  background: rgba(7,26,43,.08);
  overflow:hidden;
}
.progressPill__bar > span{
  display:block;
  height:100%;
  width:0%;
  background: rgba(14,165,163,.55);
  border-radius: var(--r-pill);
}
@media (max-width: 640px){
  .progressPill{
    width: 100%;
  }
  .progressPill__bar{
    flex:1 1 auto;
    width:auto;
    max-width:none;
  }
}

/* Tasks */
.images{
  display:flex;
  flex-direction:column;
  gap: 14px;
}

.card--tasks{
  width: 100%;
}

.taskCard{
  background: var(--white);
  border: 1px solid rgba(7,26,43,.10);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  overflow:hidden;
  position: relative;
}
.taskCard--done{
  border-color: rgba(22,163,74,.28);
  box-shadow: 0 18px 45px rgba(22,163,74,.10);
}

.taskHead{
  padding: 12px 14px;
  border-bottom: 1px solid rgba(7,26,43,.08);
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
}
@media (max-width: 700px){
  .taskHead{
    flex-direction: column;
    align-items: stretch;
  }
  .taskHead > div:last-child{
    justify-content:flex-end;
  }
}

.taskLine{
  display:flex;
  align-items:baseline;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}
.taskLine__left{
  font-weight: 950;
  color: var(--ink);
  white-space:nowrap;
}
.taskLine__sep{ color: rgba(7,26,43,.35) }
.taskLine__right{
  color: var(--muted);
  font-weight: 800;
  overflow:hidden;
  text-overflow:ellipsis;
  min-width: 0;
}

.taskBody{ padding: 12px }
@media (max-width: 640px){
  .taskBody{ padding: 10px; }
}

.paper{
  background: #fff;
  border: 1px solid rgba(7,26,43,.08);
  border-radius: var(--r-lg);
  padding: 10px;
  box-shadow: 0 10px 20px rgba(7,26,43,.06);
}
@media (max-width: 640px){
  .paper{ padding: 8px; }
}

.taskCard--done .paper{
  outline: 2px solid rgba(22,163,74,.18);
  outline-offset: 2px;
}
.paper img{
  display:block;
  max-width: 100%;
  width: 100%;
  height:auto;
  border-radius: 16px;
}

.taskFoot{
  margin-top: 12px;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
}
.taskFoot--status{
  justify-content:flex-end;
}
@media (max-width: 640px){
  .taskFoot,
  .taskFoot--status{
    justify-content:flex-start;
  }
}

/* STATUS BADGE */
.doneBadge{
  display:inline-flex !important;
  align-items:center;
  gap:8px;
  padding: 8px 10px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(220,38,38,.22);
  color: rgb(127, 29, 29);
  font-weight: 950;
  font-size: 12px;
  box-shadow: 0 10px 22px rgba(7,26,43,.08);
}
.doneBadge::after{
  content: "Do zrobienia";
}
.doneDot{
  width:10px;
  height:10px;
  border-radius:999px;
  background: var(--todo);
  box-shadow: 0 0 0 5px rgba(220,38,38,.14);
}

.taskCard--done .doneBadge{
  border-color: rgba(22,163,74,.22);
  color: rgb(20,83,45);
}
.taskCard--done .doneBadge::after{
  content: "Zrobione";
}
.taskCard--done .doneDot{
  background: var(--done);
  box-shadow: 0 0 0 5px rgba(22,163,74,.14);
}

/* Footer */
.footer{
  color: rgba(7,26,43,.72);
  margin-top: 28px;
}
.footer .container{
  padding: 0 0 28px 0;
}
.footer__inner{
  border-top: 1px solid rgba(7,26,43,.10);
  padding-top: 18px;
}
.footer__text{
  margin-top: 6px;
  color: rgba(7,26,43,.58);
  font-size: 14px;
  line-height: 1.5;
}

@media (prefers-reduced-transparency: reduce){
  .topbar,
  .heroCard,
  .sectionTile,
  .list__item,
  .taskHead{
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}
/* Search */
.searchForm{ margin-top: 12px; }
.searchGrid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.searchField{
  display:flex;
  flex-direction:column;
  gap: 8px;
}
.searchField span{
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}
.searchField input,
.searchField select{
  width:100%;
  min-height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(7,26,43,.12);
  background: rgba(255,255,255,.82);
  color: var(--ink);
  padding: 0 14px;
  font: inherit;
  outline: none;
}
.searchField input:focus,
.searchField select:focus{
  border-color: rgba(14,165,163,.45);
  box-shadow: 0 0 0 4px rgba(14,165,163,.12);
}
.searchField.is-disabled{
  opacity: .55;
}
.searchErrors{
  margin-top: 14px;
  display:flex;
  flex-direction:column;
  gap: 8px;
}
.searchError{
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(220,38,38,.08);
  border: 1px solid rgba(220,38,38,.18);
  color: rgb(127,29,29);
  font-weight: 700;
}
/* Task filter controls */
.taskFilterBar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}
.taskFilterBtn{
  cursor:pointer;
}
.taskFilterBtn.is-active{
  background: rgba(14,165,163,.18);
  border-color: rgba(14,165,163,.45);
  color: var(--ink);
}
/* Search inline year + formula bar */
.searchInlineBar{
  margin-top: 12px;
  display:flex;
  gap: 12px;
  align-items:flex-end;
  flex-wrap: wrap;
}
.searchInlineBar.is-disabled{
  opacity: .55;
}
.searchField--compact{
  min-width: 160px;
}
.searchField--grow{
  flex: 1 1 320px;
}

@media (max-width: 640px){
  .searchInlineBar{
    flex-direction: column;
    align-items: stretch;
  }
  .searchField--compact,
  .searchField--grow{
    min-width: 0;
    flex: 1 1 auto;
  }
}